<?php

class Game extends Obj {
	public $name;
	public $table;
	public $hash;

	public function Game ($name) {
		parent::__construct();
		$this->name=  $name;
	}

	/**
	** Update table & hash
	**/
	public function updateTable($tblId=false) {
		if($tblId==false) {
			$table = DB::load($this->table);
		} else {
			$table = DB::load($tblId);
			$this->table = $tblId;
		}
		$this->hash = $table->hash();
	}

}

?>